/**
 * Created by lanouhn on 16/12/2.
 */
var index1=0;
$('.cir span').click(function  () {
    $(this).css({
        backgroundColor: 'red',
        border: '0.2rem solid red'
    });
    $(this).siblings().css({
        backgroundColor: '#d2d2d2',
        border: '0.2rem solid white '
    })

    index1 = $(this).index();

    $('.content').css({
        left:-100 *( index1)+'vw',
        transition:'left 1.5s'
    })
});
setInterval(function () {
    index1++;
    $('.cir span').css({
        backgroundColor: '#d2d2d2',
        border: '0.2rem solid white'
    })
    $('.cir span').eq(index1-1).css({
        backgroundColor: 'red',
        border: '0.2rem solid red'
    })
    $('.content').css({
        left:-100 * (index1-1)+'vw',
        transition:'left 1.5s'
    })

    if(index1>2){
        index1=0
    }

},2000)
